<?php
use RAD\Abstraction\Module;
use RAD\Base\Router;
/**
 * Description of FrontendModule
 *
 * @author Bryan Salazar
 */
class FrontendModule extends Module
{
    
    public function init() 
    {
        $routes = require_once $this->moduleBasePath . DIRECTORY_SEPARATOR . 'config/routes.php';
        $controllerPath = $this->moduleBasePath . DIRECTORY_SEPARATOR . 'controller';

        Router::app()
                ->setControllerPath($controllerPath)
                ->setDefault('SiteController/overview')
                ->setError404('ErrorController/error404')
                ->setError500('ErrorController/error500')
                ->setRoutes($routes)
                ->run();
    }
    
    public function onAfterControllerAction() 
    {
        
    }
    
    public function onBeforeControllerAction() 
    {
        
    }
}